package lcr;

public class Test0072 {
}

class Solution072_1 {
    public int mySqrt(int x) {
        int l = 1, r = x;
        while (l <= r) {
            int mid=(r+l)>>1;
            if (x / mid == mid) return mid;
            else if (x / mid < mid) r = mid - 1;
            else l = mid + 1;
        }
        return r;
    }
}
